/**
 * Created by lvlq on 16/1/14.
 */
var express = require("express");
var app = express();
var session = require('express-session');
var RedisStore = require('connect-redis')(session);
var uuid = require("uuid");
app.set("views", __dirname + "/Tpl");
app.set("name", "Index");
require("../Farmework")(app);
//do yourself ...
// app.use(function (req, res, next) {
//     var user = req.cookies.user;
//     if (user) {
//         user = JSON.parse(user);
//     }
//     console.log("cookie");
//     console.log(user);
//     req.user.session = req.user.session || {};
//     req.
//     next();
// });

require("./Lib")(app);

module.exports = app;